load("@rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cmd",
    srcs = ["cmd.go"],
    importpath = "github.com/pachyderm/pachyderm/v2/src/server/cmd/pachctl/cmd",
    visibility = ["//visibility:public"],
    deps = [
        "//src/internal/client",
        "//src/internal/cmdutil",
        "//src/internal/config",
        "//src/internal/errors",
        "//src/internal/grpcutil",
        "//src/internal/log",
        "//src/internal/metrics",
        "//src/internal/pachctl",
        "//src/internal/signals",
        "//src/internal/snapshot/cmds",
        "//src/internal/task/cmds",
        "//src/pps",
        "//src/server/admin/cmds",
        "//src/server/auth/cmds",
        "//src/server/cmd/pachctl/shell",
        "//src/server/config",
        "//src/server/debug/cmds",
        "//src/server/enterprise/cmds",
        "//src/server/identity/cmds",
        "//src/server/license/cmds",
        "//src/server/logs/cmds",
        "//src/server/metadata/cmds",
        "//src/server/misc/cmds",
        "//src/server/pfs/cmds",
        "//src/server/pps/cmds",
        "//src/server/transaction/cmds",
        "//src/version",
        "//src/version/versionpb",
        "@com_github_fatih_color//:color",
        "@com_github_juju_ansiterm//:ansiterm",
        "@com_github_spf13_cobra//:cobra",
        "@org_golang_google_grpc//status",
        "@org_golang_google_protobuf//proto",
        "@org_golang_google_protobuf//types/known/emptypb",
        "@org_uber_go_zap//zapcore",
    ],
)

go_test(
    name = "cmd_test",
    size = "small",
    srcs = ["cmd_test.go"],
    embed = [":cmd"],
    deps = [
        "//src/internal/config",
        "//src/internal/grpcutil",
        "//src/internal/require",
        "//src/internal/testutilpachctl",
        "//src/internal/uuid",
        "@com_github_spf13_cobra//:cobra",
    ],
)
